@(activities: List[gitbucket.core.model.Activity],
  recentRepositories: List[gitbucket.core.service.RepositoryService.RepositoryInfo],
  userRepositories: List[gitbucket.core.service.RepositoryService.RepositoryInfo])(implicit context: gitbucket.core.controller.Context)
@import context._
@import gitbucket.core.view.helpers._
@main("GitBucket"){
  @dashboard.html.tab()
  <div class="container">
    <div class="row-fluid">
      <div class="span8">
        <div class="pull-right">
          <a href="@path/activities.atom"><img src="@assets/common/images/feed.png" alt="activities"></a>
        </div>
        @helper.html.activities(activities)
      </div>

      <div class="span4">
        @settings.information.map { information =>
          <div class="alert alert-info" style="background-color: white; color: #555; border-color: #4183c4; font-size: small; line-height: 120%;">
            <button type="button" class="close" data-dismiss="alert">&times;</button>
            @Html(information)
          </div>
        }
        @if(loginAccount.isEmpty){
          @signinform(settings)
        } else {
          <table class="table table-bordered">
            <tr>
              <th class="metal">
                <div class="pull-right">
                  <a href="@path/new" class="btn btn-success btn-mini">New repository</a>
                </div>
                Your repositories (@userRepositories.size)
              </th>
            </tr>
            @if(userRepositories.isEmpty){
              <tr>
                <td>No repositories</td>
              </tr>
            } else {
              @userRepositories.map { repository =>
                <tr>
                  <td>
                    @helper.html.repositoryicon(repository, false)
                    @if(repository.owner == loginAccount.get.userName){
                      <a href="@url(repository)"><span class="strong">@repository.name</span></a>
                    } else {
                      <a href="@url(repository)">@repository.owner/<span class="strong">@repository.name</span></a>
                    }
                  </td>
                </tr>
              }
            }
          </table>
        }
        <table class="table table-bordered">
          <tr>
            <th class="metal">
              Recent updated repositories
            </th>
          </tr>
          @if(recentRepositories.isEmpty){
            <tr>
              <td>No repositories</td>
            </tr>
          } else {
            @recentRepositories.map { repository =>
              <tr>
                <td>
                  @helper.html.repositoryicon(repository, false)
                  <a href="@url(repository)">@repository.owner/<span class="strong">@repository.name</span></a>
                </td>
              </tr>
            }
          }
        </table>
      </div>
    </div>
  </div>
}
